import request from '@/utils/request'

// 查询订单商品列表
export function listShoporderitem(query) {
  return request({
    url: '/transaction/shoporderitem/list',
    method: 'get',
    params: query
  })
}

// 查询订单商品详细
export function getShoporderitem(id) {
  return request({
    url: '/transaction/shoporderitem/' + id,
    method: 'get'
  })
}

// 新增订单商品
export function addShoporderitem(data) {
  return request({
    url: '/transaction/shoporderitem',
    method: 'post',
    data: data
  })
}

// 修改订单商品
export function updateShoporderitem(data) {
  return request({
    url: '/transaction/shoporderitem',
    method: 'put',
    data: data
  })
}

// // 删除订单商品
// export function delShoporderitem(id) {
//   return request({
//     url: '/transaction/shoporderitem/' + id,
//     method: 'delete'
//   })
// }

// 删除订单商品（逻辑删除）
export function delShoporderitem(id) {
  return request({
    url: '/transaction/shoporderitem/' + id,
    method: 'delete'
  })
}
